package com.mrlv.api.enums;

public enum ResultStatusEnum {
    OK(200, "OK"),
    NO_DATA(402, "无数据"),
    INVALID_PARAM(400, "参数不合法"),
    INVALID_AUTH(401, "用户权限不够"),
    SYSTEM_ERR(500, "系统错误"),
    API_VERSION_ERROR(4001, "APP调用接口版本错误"),
    INVALID_PASSWORD(10001, "用户名或密码错误"),
    INVALID_TOKEN(10002, "无效的TOKEN"),
    INVALID_HEADER_PARAM(10003, "参数头标识不合法"),
    EXPIRED_TOKEN(10004, "TOKEN过期"),
    FORGED_TOKEN(10005, "伪造的TOKEN"),
    UNAUTHORIZED_APP(20001, "未授权的应用"),
    UNAUTHORIZED_SERVICE(20001, "未授权的服务"),
    NO_PERMISSION_USER(20003, "未授权的用户"),
    FLOP(501, "操作失败");

    private int code;
    private String msg;

    public int getCode() {
        return this.code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private ResultStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
